package edu.xhxy;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;


public class TokenizerMapper extends Mapper<Object, Text,Text,IntWritable> {
    protected void map(Object key, Text value, Mapper<Object, Text,Text,IntWritable>.Context context) throws IOException, InterruptedException {
        String word [] = value.toString().split(" ");
        String nm = word[0];
        String sc = word[1];
        int sx = Integer.parseInt(sc);
        context.write(new Text(nm),new IntWritable(sx));
    }
}